﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Masters/WithoutPermBasic.Master" AutoEventWireup="true" CodeBehind="TMTaskAssignMa.aspx.cs" Inherits="PMS.WaitDealUI.TMTaskAssignMa" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
        <script type="text/javascript">
            var DealId = com.get.DealId;

            $(function () {
                $("#tbList").datagrid({
                    url: '/Logic/CommonAjax/WaitDealAjax.aspx?method=CommonWaitDealList',
                    loadMsg: '数据加载中请稍后……',
                    fitColumns: true,
                    queryParams: { DealId: DealId },
                    pagination: true,
                    rownumbers: true,
                    idField: "ID",
                    striped: true,
                    frozenColumns: [[
                    { field: 'ck', checkbox: true, width: 30 },
                     { field: 'TaskCode', title: '生产制号 ', align: "center", sortable: true },
                      { field: 'ContractCode', title: '销售合同号 ', align: "center", width: 150, sortable: true },
                   { field: 'ProjName', title: '项目名称 ', align: "center", width: 100, formatter: function (value, row, Index) { return row.ProjName + "(" + row.ProjNum + ")" } },
                     { field: 'EngName', title: '工程名称 ', width: 150, align: "center" }
                    ]],

                    columns: [[
                          { field: 'TaskNum', title: '台数 ', align: "center" },
                           { field: 'IsElect', title: '电器制号 ', align: "center" },
                           { field: 'RecvDate', title: '接收日期 ', align: "center", sortable: true },
                             { field: 'AddDate', title: '登记日期 ', align: "center", sortable: true },
                               { field: 'Clerk', title: '技术员 ', align: "center", sortable: true },
                               { field: 'ChargePart', title: '负责部分 ', align: "center" },
                                 { field: 'RequireFinsihDate', title: '要求完成时间 ', align: "center", sortable: true },
     { field: 'PlanFinishDate', title: '计划完成日期 ', align: "center", sortable: true },
                     { field: 'RealFinishDate', title: '实际完成日期 ', align: "center", sortable: true },
                         {
                             field: 'State', title: '状态 ', align: "center", formatter: function (value, row, Index) {
                                 //  return value=="0"?"进行中":value=="1"?"一份功":"";
                                 return com.getArrayText(StaticCombo.TaskState, value);
                             }
                         }
                    ]]
                });
            });


            function funcEdit() {
                var row = $('#tbList').datagrid('getSelected');
                if (row) {
                    top.wrapper.addTab("技术任务编辑", "/UI/TM/TechAddTask.aspx?action=edit&TaskCode=" + row.TaskCode);
                }
                else {
                    com.message("information", "请选中一行");
                }

            }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceToorbar" runat="server">
      <a href="javascript:void(0)" id="Search" class="easyui-linkbutton"
        data-options="iconCls:'icon-edit',plain:true" onclick="funcEdit()">编辑</a> &nbsp;&nbsp;
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
      <table id="tbList" title="技术任务待分工 " style="width: 100%">
        </table>
</asp:Content>
